<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>

     //深拷贝:我变你不变
    // let obj = {a:1,b:2};
    // let obj1 = {a:3,b:4};
    // //合并对象:合并对象，收到影响的是第一个参数
    // //如果相同的属性进行合并
    // Object.assign(obj,obj1);
    // //打印obj1   obj
    // obj1.a = 999;
    // console.log(obj1);
    // console.log(obj);
</script>
<script>

    //浅拷贝:我变你也变
    // let obj = { a: 1, b: 2, c: [{ attrName: 'xxxx', valueId: 'yyyyy' }] };
    // let obj1 = { a: 3, b: 4, c: [{ attrName: 'zzzz', valueId: 'kkkk' }] };
    // Object.assign(obj, obj1);

    // obj.c[0].attrName = '豪哥测试';
    // console.log(obj);

    // console.log(obj1);
</script>

<script>

    let item = {a:1};

    console.log(item.hasOwnProperty('b'));
</script>